home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ETO Development Tools 1
/
ETO Development Tools 1.iso
/
Essentials
/
MPW 411
/
UserStartup•Help
< prev
Wrap
Text File
|
1990-06-14
|
4KB
|
128 lines
# 3/20/90
# 411 - UserStartup•Help Script - MPW 3.2
#
# Copyright 1989,1990, Apple Computer, Inc.
# All Rights Reserved.
#
#
# To automatically mount your 411 file server when MPW launches...
#
# Set the "Help_Server" variable to the "zone:server:volume" where your "411"
# help folder resides. Requires the MPW 3.2 Choose command.
#
Set Help_Server "" # "Development Tools:Okefenokee:The Star:"
Set Guest 0 # set to 1 # if you want to log on as guest, else set to 0.
IF "{Help_Server}" != ""
if not "`Exists "{Help_Server}"`"
IF {Guest}
Choose "{Help_Server}" -guest
Else
Choose "{Help_Server}" -u "{User}" -askpw
End
End
End
# Set type of header - default is abreviated header
Set headerStyle -h2 # Set headerStyle -h # Expanded header -lists all files searched
# Specify the help directory
Set HelpDirectory "{ShellDirectory}Help Folder:"
# Get the location of:
# ... the 411 directory,
# ... the current 411 template and
if not "`Exists "{HelpDirectory}"`"
NewFolder "{HelpDirectory}"
End
if "`Exists "{HelpDirectory}"Help_Folder`"
Set Help_Folder "`Catenate "{HelpDirectory}"Help_Folder`"
End
if not "`Exists "{HelpDirectory}"Help_Folder`" || not "`Exists "{Help_Folder}"`"
Set exit 0; Set temp "{Boot}"; Loop; ∂
Set temp "`(GetFileName "{temp}" -q -d -m "Where is your ∂"411∂" folder?")≥dev:null`"; ∂
if "{temp}"!=""; Echo -n "{temp}" > "{HelpDirectory}"Help_Folder; ∂
Set Help_Folder "{temp}"; Else; set exit 1; exit; End; ∂
(set x "`Files "{temp}"≈Help`") ≥dev:null; ∂
if "{x}"==""; Alert 411 - The ∂"{temp}∂" folder does not contain Help files.; else; break; end; End; ∂
set exit 1 ; ∂
End
if not "`Exists "{HelpDirectory}"Help_Files`"
Set exit 0;Files "{Help_Folder}"≈Help -q > "{HelpDirectory}"Help_Files;set exit 1
End
Set Help_Folder "`Catenate "{HelpDirectory}"Help_Folder`"
Export HelpDirectory
# Aliases for the "Get" tool
Alias Man Get -d Help -width 60 ∂"∂{Help_Folder∂}∂"MPWHelp -k
# Help Menu definitions.
DeleteMenu 411 ≥dev:null || ;
AddMenu 411 "Contents" ∂
'(Get {headerStyle} -m -d Help -width 60 -dfl "{HelpDirectory}"Help_Files -k "Help" || (beep;)) ∑∑ "{HelpDirectory}"Help; ∂
Open "{HelpDirectory}"Help'
AddMenu 411 "Look up/E" ∂
'(Get {headerStyle} -m -d Help -s -width 60 -dfl "{HelpDirectory}"Help_Files || (beep ;)) ∑∑ "{HelpDirectory}"Help; ∂
Open "{HelpDirectory}"Help'
AddMenu 411 "Template/1" ∂
'get -q -s -t -dfl "{HelpDirectory}"Help_Files >"{HelpDirectory}"Help_Temp; ∂
set x "`Catenate "{HelpDirectory}"Help_Temp`"; ∂
if "{x}"=="";beep;exit 0;end; Echo -n "{x}" >"{Active}".§'
AddMenu 411 "Show Keys" ∂
'(Get {headerStyle} -m -s -l -width 60 -dfl "{HelpDirectory}"Help_Files || (beep;)) ∑∑ "{HelpDirectory}"Help; ∂
Open "{HelpDirectory}"Help'
AddMenu 411 "Search" ∂
'(Get {headerStyle} -m -s -search -width 60 -dfl "{HelpDirectory}"Help_Files || (beep;)) ∑∑ "{HelpDirectory}"Help; ∂
Open "{HelpDirectory}"Help'
AddMenu 411 "(-" ""
AddMenu 411 "Set First File…" ∂
'set exit 0;get -sfl -dfl "{HelpDirectory}"Help_Files >"{HelpDirectory}"Help_Temp; ∂
set x "`Catenate "{HelpDirectory}"Help_Temp`"; ∂
Set temp "`(GetListItem -q -m "Set First Help File to:" -d {x})≥dev:null`";∂
if "{temp}"!=""; ∂
(Get {headerStyle} -m -d Help -k "{temp}" -width 60 -dfl "{HelpDirectory}"Help_Files || (beep ;)) ∑∑ "{HelpDirectory}"Help; ∂
Open "{HelpDirectory}"Help; End;set exit 1'
AddMenu 411 "Set 411 Files…" ∂
'Set exit 0; Set temp "{Boot}"; Loop; ∂
Set temp "`(GetFileName "{temp}" -q -d -m "Where is your ∂"411∂" folder?")≥dev:null`"; ∂
if "{temp}"==""; break; End; ∂
(set x "`Files "{temp}"≈Help`") ≥dev:null; ∂
if "{x}"==""; Alert 411 - The ∂"{temp}∂" folder does not contain Help files.; ∂
else; Files -q "{temp}"≈Help > "{HelpDirectory}"Help_Files;break; end; End; ∂
set exit 1 '
AddMenu 411 "Edit 411 Files…" ∂
'Open "{HelpDirectory}"Help_Files;'
AddMenu 411 "(-" ""
AddMenu 411 'About 411…' ∂
'Alert -s "∂"411∂" was brought to you by: ∂n∂n Bob, Bill, Rudi, Ron, ∂n∂n …and their friends."; ∂
(Get -m -k "About411" -dfl "{HelpDirectory}"Help_Files || (beep ;)) ∑∑ "{HelpDirectory}"Help; ∂
Open "{HelpDirectory}"Help'
if not "`Exists "{HelpDirectory}"Help`"
Echo > "{HelpDirectory}"Help
End